package com.lmt_28;

import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.SocketException;

public class ServerMulity {
    public static void main(String[] args) throws Exception {
        DatagramSocket socket = new DatagramSocket(6666);
        while (true){
            byte [] bytes = new byte[1024*64];
            DatagramPacket packet = new DatagramPacket(bytes,bytes.length);
            socket.receive(packet);

            int len = packet.getLength();
            String s = new String(bytes, 0, len);
            System.out.println(s);
        }
    }
}
